public class If_Else_ElseIF_Condition {
    // if - else - elseif condition in Java
    public static void main(String[] args) {
        int age = 25;
        if (age > 60) {
            System.out.println("老年");
        } else if (age > 40 && age < 60) {
            System.out.println("中年");
        } else if (age > 20 && age < 40) {
            System.out.println("青年");
        } else {
            System.out.println("少年");
        }
    }
}
